/**
 * Copyright 2011-2013 Brin.com
 * All rights reserved.
 * 
 * @project
 * @author Brin
 * @version 1.0
 * @date 2012-12-22
 */
package com.brin.code.common;

import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;

import com.brin.core.common.SpringBeanUtil;

/**
 * 多线程发送邮件
 * @author Brin
 *
 */
public class SendMailRunnable extends Thread {
	private SimpleMailMessage message;
	public void run() {
		JavaMailSender javaMailSender = (JavaMailSender) SpringBeanUtil.getBean("javaMailSender");
		javaMailSender.send(message);
	}
	
	public SendMailRunnable(SimpleMailMessage message) {
		this.message = message;
	}
}